package com.bii.gelapp;

import java.util.ArrayList;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

public class CompareFullScreenActivity extends Activity {
	public static ArrayList<ConnectedComponent> markerlist = new ArrayList<ConnectedComponent>();
	public static ArrayList<Integer> markervalues = new ArrayList<Integer>();
	public Bitmap originalBmp;
	public Menu menu;
	public CompareTouchImageView imgView;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.comparefullscreenactivity);
		if (getIntent().hasExtra("markerlist")) {
			markerlist = (ArrayList<ConnectedComponent>) getIntent()
					.getSerializableExtra("markerlist");
		}
		if (getIntent().hasExtra("markervalues")) {
			markervalues = (ArrayList<Integer>) getIntent()
					.getSerializableExtra("markervalues");
		}
		originalBmp = RotationActivity.colorBmp;
		imgView = new CompareTouchImageView(this, originalBmp);

		imgView.setMaxZoom(8f);

		setContentView(imgView);
		
	}
	@Override
	public boolean onCreateOptionsMenu(Menu menu1) {
		// TODO Auto-generated method stub
		this.menu = menu1;
		getMenuInflater().inflate(R.menu.valuemenu, menu1);
		return true;
	}
	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		// TODO Auto-generated method stub
		super.onOptionsItemSelected(item);
		switch (item.getItemId()) {
		case R.id.btConfirm:
			Intent returnActivity = new Intent(CompareFullScreenActivity.this,
					CompareActivity.class);
			CompareActivity.markervalues = CompareFullScreenActivity.markervalues;
			startActivity(returnActivity);
			
			
			break;
		case R.id.btCancel:
			Intent returnActivity2 = new Intent(CompareFullScreenActivity.this,
					CompareActivity.class);
			
			startActivity(returnActivity2);
			break;

			
		}
		return true;
		}
	
	
}
